package com.ocom.common.enums;

public enum DataSourceEnum {
    //总库
    MAIN_DB(0),
    //分库
    PART_DB(1);

    private final int value;

    private DataSourceEnum(int value) {
        this.value = value;
    }

    public DataSourceEnum valueOf(int value) {
        switch (value) {
            case 0:
                return DataSourceEnum.MAIN_DB;
            case 1:
                return DataSourceEnum.PART_DB;
            default:
                return null;
        }
    }


}
